<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>完整demo</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor.all.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script>

    <style type="text/css">
        div{
            width:100%;
        }
    </style>
</head>
<body>
<div style="overflow-y: hidden;">
    <h1>完整demo</h1>
    <script id="editor" type="text/plain" style="width:1024px;height:500px;overflow-y: hidden;"></script>
</div>
<div id="btns">
    <div>
        <button onclick="insertHtml()">插入给定的内容</button>
    </div>
</div>
<div>
    <button onclick="createEditor()">
    创建编辑器</button>
    <button onclick="deleteEditor()">
    删除编辑器</button>
</div>
<script src='third-party/jquery-1.10.2.js' type='text/javascript'></script>
<script type="text/javascript">

    //实例化编辑器
    var ue = UE.getEditor('editor',{pasteFilter: true});
    //插入指定html代码
    function insertHtml() {
        UE.getEditor('editor').execCommand('insertHtml', '<span class="yidong">这个spen标签不可编辑</span>')
        //触发子页面焦点方法
        var iframe = document.getElementById('ueditor_0').contentWindow;
        iframe.yidong();
    }
    // self.setInterval(createEditor,2000);
    // function createEditor(){
        
    // }
    
</script>
</body>
</html>